package ar.edu.unq.tpi.uis.tepe3.wicket.components;

import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;

import ar.edu.unq.tpi.uis.tepe3.dominio.User;
import ar.edu.unq.tpi.uis.tepe3.wicket.pages.UserPage;

@SuppressWarnings("serial")
public class UserForm extends AbstractFormABM<User>{

	public UserForm(String id, User object) {
		super(id, object);
	}

	@Override
	protected void addFields() {
		this.add(new TextField("name", String.class).setRequired(true));
        this.add(new PasswordTextField("pass"));
	}

	@Override
	protected void redirectToListPage() {
		this.setResponsePage(UserPage.class);
	}

}
